/***************************************************
//Filename:     classes.h                          //
//Version:	    V1.0							  //
//Released:		2009-07-03 18:00			      //
//Author:		Hua Weidong						  //


//         READ ME
**2009-07-03 18:00
1. Version V1.0 is released

****************************************************/

#ifndef	___CLASSES_H___
#define	___CLASSES_H___

#include	<stdint.h>
#include	<stdbool.h>


typedef void*   OBJECT;
typedef struct _NOTIFY_EVENT
{
	OBJECT  responder;
	void    (*handler)(void* responder,void* sender);
} NOTIFY_EVENT;
	
typedef struct _RECEIVE_EVENT
{
	OBJECT  responder;
	void    (*handler)(void* responder, void* sender, const void *buf, uint16_t size);
} RECEIVE_EVENT;

typedef struct _RECEIVE_INFO_EVENT
{
	OBJECT  responder;
	void    (*handler)(void* responder, void* sender, const void *info, uint16_t infoType);
} RECEIVE_INFO_EVENT;

typedef struct _EXTRACT_FAIL_EVENT
{
	OBJECT  responder;
	void    (*handler)(void* responder, void* sender, const char *frame);
} EXTRACT_FAIL_EVENT;

typedef struct _COM_RECEIVE_STRING_EVENT
{
	OBJECT  responder;
	void    (*handler)(void* responder, void* sender, const char *str);
} COM_RECEIVE_STRING_EVENT;

typedef struct _COM_RECEIVE_INFO_EVENT
{
	OBJECT  responder;
	void    (*handler)(void* responder, void* sender, const void *info, uint16_t infoType);
} COM_RECEIVE_INFO_EVENT;

typedef struct _RECEIVE_INIT_EVENT
{
	OBJECT  responder;
	void    (*handler)(void* responder, void* sender, const void *info, uint16_t infoType);
} RECEIVE_INIT_EVENT;

#endif
